package com.yboot.module.system.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yboot.starter.common.core.web.validation.InsertGroup;
import com.yboot.starter.common.core.web.validation.UpdateGroup;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * 存储表
 * @author yangcs
 * @date 2025-08-29
 */
@Data
public class SysStorageDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @NotBlank(message = "id不能为空", groups = {UpdateGroup.class})
    private String id;
    /**
     * 名称
     */
    @NotBlank(message = "name不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String name;
    /**
     * 编码
     */
    @NotBlank(message = "code不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String code;
    /**
     * 类型（1：本地存储；2：对象存储）
     */
    @NotBlank(message = "type不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String type;
    /**
     * Access Key
     */
    private String accessKey;
    /**
     * Secret Key
     */
    private String secretKey;
    /**
     * Endpoint
     */
    private String endpoint;
    /**
     * Bucket
     */
    @NotBlank(message = "bucketName不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String bucketName;
    /**
     * 域名
     */
    private String domain;
    /**
     * 描述
     */
    private String description;
    /**
     * 是否为默认存储
     */
    @NotNull(message = "isDefault不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Boolean isDefault;
    /**
     * 排序
     */
    @NotNull(message = "sort不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private Integer sort;
    /**
     * 状态（1：启用；2：禁用）
     */
    @NotBlank(message = "status不能为空", groups = {InsertGroup.class, UpdateGroup.class})
    private String status;
    /**
     * 删除标识
     */
    private String deleteFlag;
}
